package com.example.tool.task.networkTool;

import org.springframework.web.client.RestTemplate;

/**
 * @ClassName interfaceTool
 * @Author 13403
 * @Date 2022/5/1214:48
 * @Version 1.0
 **/
public class interfaceTool {
    //编写区域lis调用报告单接口的万金油方法，并记录在表中（发送人，参数，时间，结果，具体接口地址）
    public static void main(String[] args) {

        RestTemplate restTemplate=new RestTemplate();
        String status=" ";
    }
//				//向报告单系统推送项目编码，名称，机构编码
//				List<RcReportInfo> list = new ArrayList<>();
//				RcReportInfo rcReportInfo = new RcReportInfo();
//				rcReportInfo.setInspectCode(lisInspectGroupInfo.getCode());
//				rcReportInfo.setInspectName(lisInspectGroupInfo.getName());
//				rcReportInfo.setSysOrgCode(depart.getOrgCode());
//				//接口地址
//				SysParamsModel model = new SysParamsModel();
//				model.setCode(SysParamsConstant.PUSH_REPORT_URL);
//				SysParamsModel sysParamsModel = sysParamsRedisApi.getValue(model);
//				String pushUrl = sysParamsModel.getValue() + "/rc/reportInfo/addItem";
//				//调用登陆接口返回key
//				RestTemplate restTemplate=new RestTemplate();
//				list.add(rcReportInfo);
//				String jsonString = JSON.toJSONString(list);
//				System.out.println("jsonString:"+jsonString);
//				HttpHeaders header = new HttpHeaders();
//				header.set("Content-Type","application/json;charset=utf-8");
//				HttpEntity<String> formEntity = new HttpEntity<String>(jsonString, header);
//				Result result = restTemplate.postForObject(pushUrl, formEntity, Result.class);
//				//推送成功后，将参数和时间和结果记录在push_log——item表里
//				insertPushLog(rcReportInfo, new Date(),result.toString());

}
